3.3.23 \(\int \cot (c+d x) (a+a \sec (c+d x))^n \, dx\) [223]

Optimal. Leaf size=74 \[ -\frac {\, _2F_1\left (1,n;1+n;\frac {1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^n}{2 d n}+\frac {\, _2F_1(1,n;1+n;1+\sec (c+d x)) (a+a \sec (c+d x))^n}{d n} \]

[Out]

-1/2*hypergeom([1, n],[1+n],1/2+1/2*sec(d*x+c))*(a+a*sec(d*x+c))^n/d/n+hypergeom([1, n],[1+n],1+sec(d*x+c))*(a
+a*sec(d*x+c))^n/d/n

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3965, 88, 67, 70} \begin {gather*} \frac {(a \sec (c+d x)+a)^n \, _2F_1(1,n;n+1;\sec (c+d x)+1)}{d n}-\frac {(a \sec (c+d x)+a)^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (\sec (c+d x)+1)\right )}{2 d n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + a*Sec[c + d*x])^n,x]

[Out]

-1/2*(Hypergeometric2F1[1, n, 1 + n, (1 + Sec[c + d*x])/2]*(a + a*Sec[c + d*x])^n)/(d*n) + (Hypergeometric2F1[
1, n, 1 + n, 1 + Sec[c + d*x]]*(a + a*Sec[c + d*x])^n)/(d*n)

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 88

Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), In
t[(e + f*x)^p/(a + b*x), x], x] - Dist[d/(b*c - a*d), Int[(e + f*x)^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d,
e, f, p}, x] &&  !IntegerQ[p]

Rule 3965

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[-(d*b^(m - 1)
)^(-1), Subst[Int[(-a + b*x)^((m - 1)/2)*((a + b*x)^((m - 1)/2 + n)/x), x], x, Csc[c + d*x]], x] /; FreeQ[{a,
b, c, d, n}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \cot (c+d x) (a+a \sec (c+d x))^n \, dx &=\frac {a^2 \text {Subst}\left (\int \frac {(a+a x)^{-1+n}}{x (-a+a x)} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac {a \text {Subst}\left (\int \frac {(a+a x)^{-1+n}}{x} \, dx,x,\sec (c+d x)\right )}{d}+\frac {a^2 \text {Subst}\left (\int \frac {(a+a x)^{-1+n}}{-a+a x} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac {\, _2F_1\left (1,n;1+n;\frac {1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^n}{2 d n}+\frac {\, _2F_1(1,n;1+n;1+\sec (c+d x)) (a+a \sec (c+d x))^n}{d n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 57, normalized size = 0.77 \begin {gather*} -\frac {\left (\, _2F_1\left (1,n;1+n;\frac {1}{2} (1+\sec (c+d x))\right )-2 \, _2F_1(1,n;1+n;1+\sec (c+d x))\right ) (a (1+\sec (c+d x)))^n}{2 d n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*(a + a*Sec[c + d*x])^n,x]

[Out]

-1/2*((Hypergeometric2F1[1, n, 1 + n, (1 + Sec[c + d*x])/2] - 2*Hypergeometric2F1[1, n, 1 + n, 1 + Sec[c + d*x
]])*(a*(1 + Sec[c + d*x]))^n)/(d*n)

________________________________________________________________________________________

Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \cot \left (d x +c \right ) \left (a +a \sec \left (d x +c \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+a*sec(d*x+c))^n,x)

[Out]

int(cot(d*x+c)*(a+a*sec(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+a*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((a*sec(d*x + c) + a)^n*cot(d*x + c), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+a*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((a*sec(d*x + c) + a)^n*cot(d*x + c), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \cot {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+a*sec(d*x+c))**n,x)

[Out]

Integral((a*(sec(c + d*x) + 1))**n*cot(c + d*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+a*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((a*sec(d*x + c) + a)^n*cot(d*x + c), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {cot}\left (c+d\,x\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)*(a + a/cos(c + d*x))^n,x)

[Out]

int(cot(c + d*x)*(a + a/cos(c + d*x))^n, x)

________________________________________________________________________________________